package eu.tanov.epf.pv.types.projectiteration.ui.pages;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.epf.library.edit.TngAdapterFactory;
import org.eclipse.epf.library.edit.util.TngUtil;
import org.eclipse.swt.graphics.Image;

public class QuestionaireTableLabelProvider extends AdapterFactoryLabelProvider {
	private static ComposedAdapterFactory factory = TngAdapterFactory.INSTANCE
			.getNavigatorView_ComposedAdapterFactory();
	private static QuestionaireTableLabelProvider instance;

	public synchronized static QuestionaireTableLabelProvider getInstance() {
		if (instance == null) {
			instance = new QuestionaireTableLabelProvider(factory);
		}
		return instance;
	}

	public QuestionaireTableLabelProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (columnIndex == 0) {
			return TngUtil.getLabelWithPath(element);
		} 
		return "Low";
	}

}
